//
//  AllUtils.m
//  WonderfulNotes
//
//  Created by 千锋 on 16/1/19.
//  Copyright © 2016年 andy. All rights reserved.
//

#import "AllUtils.h"

@implementation AllUtils

#pragma mark -截取时间
+(NSString *)getDateFromString:(NSString *)date{
    
    //2016:1:1-10:10:10
    
    NSString * str = date;
    NSMutableString * reverseStr =[NSMutableString string];
    
    for (int i=0; i<str.length; i++) {
        
        unichar c = [str characterAtIndex:str.length-i-1];
        
        [reverseStr appendFormat:@"%c",c];
    }
    str =reverseStr;
    
    NSString * str2 = [str substringFromIndex:8];
    NSMutableString * reverseStr2 =[NSMutableString string];
    for (int i=0; i<str2.length; i++) {
        
        unichar c = [str2 characterAtIndex:str2.length-i-1];
        
        [reverseStr2 appendFormat:@"%c",c];
    }

    str2 =reverseStr2;
    
    return  str2;
}

@end
